package edu.cs.usask.ca.silver.businesslogic.ids;

import java.util.Date;

import edu.cs.usask.ca.silver.api.persistence.StorageI;
import edu.cs.usask.ca.silver.exceptions.SilverBusinessLogicErrorException;

public class ParameterSetID extends BaseId {

	public ParameterSetID(int value) throws SilverBusinessLogicErrorException {
		super(value);
	}

	// return example: ps1, ps20
	public String toString() {
		return "ps" + idVal;
	}

	public int getIdVal() {
		return idVal;
	}

	@Override
	public boolean equals(BaseId id) {
		return ((id.getClass() == this.getClass()) && (((ParameterSetID) id)
				.getIdVal() == this.getIdVal()));
	}

	@Override
	public String getEntryNameFromDatabase(StorageI storage) throws Exception {
		return null;
	}

	@Override
	public BaseId[] getChildrenObjectIds(StorageI storage) throws Exception {
		return null;
	}

	@Override
	public boolean isEntity() {
		return false;
	}

	@Override
	public BaseId getParentObjectId(StorageI storage) throws Exception {
		return null;
	}

	@Override
	public boolean hasChildren() {
		return true;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * edu.cs.usask.ca.silver.businesslogic.ids.BaseId#accept(edu.cs.usask.ca
	 * .silver.businesslogic.ids.SilverIDVisitor)
	 */
	public void accept(SilverIDVisitor v) {
		return;
	}

	@Override
	public String getCreatorNameFromDatabase(StorageI storage) throws Exception {
		return "";
	}

	/**
	 * Like Files, ParameterSet is immutable
	 */
	@Override
	public boolean setEntryNameToDatabase(String updateName, StorageI storage) throws Exception {
		return false;
	}

	@Override
	public String getTypeFromDatabase(StorageI stoarge) throws Exception {
		return "";
	}

	@Override
	public String getDescriptionFromDatabase(StorageI stoarge) throws Exception {
		return "";
	}

	@Override
	public boolean setDescriptionToDatabase(String desc, StorageI storage) throws Exception {
		return false;
	}

	@Override
	public Date getCreationTime(StorageI storage) throws Exception {
		return null;
	}

	@Override
	public boolean deleteFromDatabase(StorageI stoarge) throws Exception {
		return false;
	}

}
